<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<div class="modal-dialog ms-modal-dialog " style="margin-top: 20px; width: 800px;">
  <div class="modal-content">

    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span
              class="sr-only">Close</span></button>
      <h4 class="modal-title">修改航班信息</h4>
    </div>

    <form id="reverse-order-edit-book-form" class="form-horizontal ms-form" role="form" method="POST"
          action="${ctx.host}/reverse-orders/${reverseOrder.id}/edit" data-validate="true" >

      <input type="hidden" name="_method" value="PATCH"/>

      <input type="hidden" name="reverseOrderId" value="${reverseOrder.id}"/>

      <div class="modal-body row">
        <div class="col-xs-6">

	        <div class="form-group  ms-form-group">
	          <label class="control-label col-xs-3">航空公司：</label>
	          <div class="col-xs-8 pull-left ">
	            <select name="aviationBook.bookAirline" class="form-control select2" data-validate="required">
	              <option value="斐济航空" ${reverseOrder.aviationBook.bookAirline == '斐济航空' ? 'selected' : ''}>斐济航空</option>
	              <option value="英国航空" ${reverseOrder.aviationBook.bookAirline == '英国航空' ? 'selected' : ''}>英国航空</option>
	            </select>
	          </div>
	        </div>
	        <div class="form-group  ms-form-group">
	          <label class="control-label col-xs-3">航班号：</label>
	          <div class="col-xs-8 pull-left role-login-name">
	            <input type="text" class="form-control" name="aviationBook.flightNumber" value="${reverseOrder.aviationBook.flightNumber}"  autocomplete="off" data-validate="required"/>
	          </div>
	        </div>
	        <div class="form-group  ms-form-group">
	          <label class="control-label col-xs-3">舱位：</label>
	          <div class="col-xs-8 pull-left role-login-name">
	            <input type="text" class="form-control" name="aviationBook.position" value="${reverseOrder.aviationBook.position}"  autocomplete="off" data-validate="required"/>
	          </div>
	        </div>
	        <div class="form-group  ms-form-group">
	          <label class="control-label col-xs-3">出发时间：</label>
	          <div class="col-xs-8 pull-left role-login-name">
	
	            <input type="text" class="form-control datetimepicker" name="aviationBook.departureTime" value="<fmt:formatDate value="${reverseOrder.aviationBook.departureTime}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate>" autocomplete="off" data-validate="required"/>
	          </div>
	        </div>
	        <div class="form-group  ms-form-group">
	          <label class="control-label col-xs-3">到达时间：</label>
	          <div class="col-xs-8 pull-left role-login-name">
	            <input type="text" class="form-control datetimepicker" name="aviationBook.arriveTime" value="<fmt:formatDate value="${reverseOrder.aviationBook.arriveTime}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate>" autocomplete="off" data-validate="required"/>
	          </div>
	        </div>
	
	        <div class="form-group  ms-form-group">
	          <label class="control-label col-xs-3">出发机场：</label>
	          <div class="col-xs-8 pull-left role-login-name">
	            <input type="text" class="form-control" name="aviationBook.departureLocation" value="${reverseOrder.aviationBook.departureLocation}" autocomplete="off" data-validate="required"/>
	          </div>
	        </div>
	
	        <div class="form-group  ms-form-group">
	          <label class="control-label col-xs-3">到达机场：</label>
	          <div class="col-xs-8 pull-left role-login-name">
	            <input type="text" class="form-control" name="aviationBook.arriveLocation" value="${reverseOrder.aviationBook.arriveLocation}" autocomplete="off" data-validate="required"/>
	          </div>
	        </div>
	
	        <div class="form-group  ms-form-group">
	          <label class="control-label col-xs-3">飞行时间：</label>
	          <div class="col-xs-8 pull-left role-login-name">
	            <input type="text" class="form-control" name="aviationBook.flightTime" value="${reverseOrder.aviationBook.flightTime}" autocomplete="off" data-validate="required"/>
	          </div>
	        </div>
	
	        <div class="form-group  ms-form-group">
	          <label class="control-label col-xs-3">+1/-1天：</label>
	          <div class="col-xs-8 pull-left role-login-name">
	            <select name="aviationBook.crossDay" class="form-control select2" data-validate="required">
	              <option value="+1" ${reverseOrder.aviationBook.crossDay == '+1' ? 'selected' : ''}>+1</option>
	              <option value="-1" ${reverseOrder.aviationBook.crossDay == '-1' ? 'selected' : ''}>-1</option>
	              <option value="无" ${reverseOrder.aviationBook.crossDay == '无' ? 'selected' : ''}>无</option>
	            </select>
	          </div>
	        </div>
	      </div>
				<div class="col-xs-6">
	        <div class="checkbox form-group  ms-form-group">
	          <label class="control-label col-xs-3">
	            <input id="returnTripCheckBox" type="checkbox" style="margin-top: 0"> 返程
	          </label>
	        </div>

	        <div id="returnTrip" style="display: none">
	
	          <div class="form-group  ms-form-group">
	            <label class="control-label col-xs-3">航班号：</label>
	            <div class="col-xs-8 pull-left role-login-name">
	              <input disabled="disabled" type="text" class="form-control" name="aviationBook.returnFlightNumber" value="${reverseOrder.aviationBook.returnFlightNumber}"  autocomplete="off" />
	            </div>
	          </div>
	          <div class="form-group  ms-form-group">
	            <label class="control-label col-xs-3">舱位：</label>
	            <div class="col-xs-8 pull-left role-login-name">
	              <input disabled="disabled" type="text" class="form-control" name="aviationBook.returnPosition" value="${reverseOrder.aviationBook.returnPosition}"  autocomplete="off" />
	            </div>
	          </div>
	          <div class="form-group  ms-form-group">
	            <label class="control-label col-xs-3">出发时间：</label>
	            <div class="col-xs-8 pull-left role-login-name">
	              <input disabled="disabled" type="text" class="form-control datetimepicker" name="aviationBook.returnDepartureTime" value="<fmt:formatDate value="${reverseOrder.aviationBook.returnDepartureTime}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate>" autocomplete="off" />
	            </div>
	          </div>
	          <div class="form-group  ms-form-group">
	            <label class="control-label col-xs-3">到达时间：</label>
	            <div class="col-xs-8 pull-left role-login-name">
	              <input disabled="disabled" type="text" class="form-control datetimepicker" name="aviationBook.returnArriveTime" value="<fmt:formatDate value="${reverseOrder.aviationBook.returnArriveTime}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate>" autocomplete="off" />
	            </div>
	          </div>
	
	          <div class="form-group  ms-form-group">
	            <label class="control-label col-xs-3">出发机场：</label>
	            <div class="col-xs-8 pull-left role-login-name">
	              <input disabled="disabled" type="text" class="form-control" name="aviationBook.returnDepartureLocation" value="${reverseOrder.aviationBook.returnDepartureLocation}" autocomplete="off" />
	            </div>
	          </div>
	
	          <div class="form-group  ms-form-group">
	            <label class="control-label col-xs-3">到达机场：</label>
	            <div class="col-xs-8 pull-left role-login-name">
	              <input disabled="disabled" type="text" class="form-control" name="aviationBook.returnArriveLocation" value="${reverseOrder.aviationBook.returnArriveLocation}" autocomplete="off" />
	            </div>
	          </div>
	
	          <div class="form-group  ms-form-group">
	            <label class="control-label col-xs-3">飞行时间：</label>
	            <div class="col-xs-8 pull-left role-login-name">
	              <input  disabled="disabled" type="text" class="form-control" name="aviationBook.returnFlightTime" value="${reverseOrder.aviationBook.returnFlightTime}"  autocomplete="off" />
	            </div>
	          </div>
	
	          <div class="form-group  ms-form-group">
	            <label class="control-label col-xs-3">+1/-1天：</label>
	            <div class="col-xs-8 pull-left role-login-name">
	              <select disabled="disabled" name="aviationBook.returnCrossDay" class="form-control select2" >
	                <option value="+1" ${reverseOrder.aviationBook.returnCrossDay == '+1' ? 'selected' : ''}>+1</option>
	                <option value="-1" ${reverseOrder.aviationBook.returnCrossDay == '-1' ? 'selected' : ''}>-1</option>
	                <option value="无" ${reverseOrder.aviationBook.returnCrossDay == '无' ? 'selected' : ''}>无</option>
	              </select>
	
	            </div>
	          </div>
	
	        </div>
				</div>
        <div class="form-group  ms-form-group col-xs-12">
          <label class="control-label col-xs-1" style="width: 13%;">备注：</label>
          <div class="col-xs-8 pull-left role-login-name" style="width: 86%;">
            <textarea style="max-width: 100%; min-height: 100px;" class="form-control" name="aviationRequest.aviationRequestRemark" autocomplete="off" >${reverseOrder.aviationRequest.aviationRequestRemark}</textarea>
          </div>
        </div>

      </div>

      <div class="modal-footer ms-modal-footer">
        <button type="submit" class="btn ms-btn btn-primary">确定</button>
        <button type="button" class="btn ms-btn ms-btn-gary" data-dismiss="modal">取消</button>
      </div>
    </form>

  </div>
</div>

